package com.cnfangmao.masterdata.service;

import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cnfangmao.masterdata.dto.AccountBasicDataRightSearchDto;
import com.cnfangmao.masterdata.dto.GeneralSearchDto;
import com.cnfangmao.masterdata.model.AccountBasicDataRight;
import com.cnfangmao.masterdata.model.BasicDataMetadata;

/**
 * <p>
 * 用户主数据权限表 服务类
 * </p>
 *
 * @author chenxd
 * @since 2020-04-14
 */
public interface AccountBasicDataRightService extends IService<AccountBasicDataRight> {
	/**
	 * @description: 根据账号Id，获取有权限的主数据列表  
	 * @author: chenxc
	 * @date: 2020年4月20日 下午4:32:46
	 * @param: @param userId
	 * @param: @return      
	 * @return: BasicDataMetadata      
	 * @throws
	 */
	public List<BasicDataMetadata> getMasterdataByUserId(String userId);
	
	AccountBasicDataRight findByUserIdAndMetadataId(String userId,String metadataId);
	
	IPage<AccountBasicDataRight> queryListAccountBasicDataRight(GeneralSearchDto<AccountBasicDataRightSearchDto>  dto);
	
	boolean checkPermissionByAccountBasicDataRight(String userId,String metadataId,Integer rightList);
	
}
